{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>卡卷使用明细&nbsp;&nbsp;&nbsp;<a href="{:url('index')}">返回</a></h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->           
            <div class="row">
                <div class="col-sm-12">   
                    <div  class="col-sm-2">
                        <img src="/static/admin/images/kj.jpg" alt="" style="width:100%;height:100%;">
                    </div>        
                    <div  class="col-sm-10">
                        <p><span style="color:#000;font-weight:900;">卡卷金额：</span>{$list.money}</p>
                        <p><span style="color:#000;font-weight:900;">使用有效时间：</span>30</p>                        
                        <p><span style="color:#000;font-weight:900;">卡卷描述：</span>{$list.title}</p>
                    </div>                                       
                                         
                </div>
            </div>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <form action="{:url('del')}" method="post">
                <div class="row">
                    <div class="col-sm-9 m-b-xs">
                        <button id="repair" class="btn btn-outline btn-danger" url="{:url('del')}" >删除记录</button>
                    </div>
                </div>
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th><input class="i-checks checkbox check-all" checked="chedked" type="checkbox"></th>
                                <th>卡卷ID</th>
                                <th>用户ID</th>
                                <th>医生姓名</th>
                                <th>卡卷使用时间</th>
                            </tr>
                        </thead>       
                            {notempty name="$file['card']"}                                            
                                {foreach name="file.card" item="vo"}
                                <tr class="long-td">
                                    <td>
                                        <input class="ids i-checks" checked="chedked" type="checkbox" name="ids[]" value="{$vo.Id}">
                                    </td>
                                    <td>{$vo['cardid']}</td>
                                    <td>{$vo['userid']}</td>
                                    <td>{$vo['admin_name']}</td>
                                    <td>{$vo['time']|date="Y-m-d",###}</td>
                                </tr>
                                {/foreach}
                            {else /} 
                                <tr class="long-td" style="text-align:center">
                                    <td colspan="7" style="color:red;">
                                        没有该卡卷的记录
                                    </td>  
                                </tr>  
                            {/notempty}
                        <tbody id="list-content"></tbody>
                    </table>
                    </form>
                    <div id="AjaxPage" style=" text-align: right;"></div>
                    <div id="allpage" style=" text-align: right;"></div>
                </div>
            </div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>

<!-- 加载动画 -->
<!-- <div class="spiner-example">
    <div class="sk-spinner sk-spinner-three-bounce">
        <div class="sk-bounce1"></div>
        <div class="sk-bounce2"></div>
        <div class="sk-bounce3"></div>
    </div>
</div> -->

{include file="public/footer" /}
<script type="text/javascript">
//全选的实现
$('.check-all').on('ifChecked', function (event) {
    $('input[name="ids[]"]').iCheck('check');
});
$('.check-all').on('ifUnchecked', function (event) {
    $('input[name="ids[]"]').iCheck('uncheck');
});
// $('#repair').click(function(){
//     alert($("input.ids[type='checkbox']:checked").length);
// })
</script>
</body>
</html>